<layout name='layout' />

<div class="admin-main">

	<blockquote class="layui-elem-quote">
		<button class="layui-btn layui-btn-small" onclick="openModel('<{:U('Chexing/add')}>','添加','80%','80%');">
			<i class="fa fa-plus"></i> 添加
		</button>

		<button class="layui-btn layui-btn-small" onclick="window.location.reload();">
			<i class="fa fa-refresh"></i> 刷新
		</button>

		<button class="layui-btn layui-btn-small layui-btn-danger" id="delBtn">
			<i class="fa fa-close"></i> 删除
		</button>

		<div class="search">
			<form class="layui-form" method="post" action="<{:U('Chexing/index')}>">
			<div class="layui-input-inline">
			<select name="brandID" id="brandID">
	    		<option value="">品牌</option>
				<volist name="c_data.brand" id="vo">
				<option value="<{$vo['id']}>"><{$vo['name']}></option>
				</volist>
	        </select>
			</div>
			
			<div class="layui-input-inline">
			<input type="text" name="carName" placeholder="车型" class="layui-input layui-btn-small">
			</div>

			<button type="submit" class="layui-btn" lay-submit=""><i class="layui-icon">&#xe615;</i> 搜索</button>

			<a href="<{:U('Chexing/index')}>" class="layui-btn layui-btn-primary">重置</a>
			</form>
		</div>
	</blockquote>

	<fieldset class="layui-elem-field">
		<legend>列表</legend>
		<div class="layui-field-box">
			<form id="ajaxForm" method="post" action="<{:U('Chexing/del')}>">
			<table class="site-table table-hover">
				<thead>
					<tr>
						<th><input type="checkbox" id="selected-all"></th>							
						<th>品牌</th>
						<th>车型</th>
						<th>年款</th>
						<th>详细车型</th>
						<th>添加日期</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<volist name="list" id="vo">
					<tr>
						<td><input type="checkbox" name="selectedids[]" value="<{$vo.id}>"></td>
						<td><{$vo.brandName}></td>
						<td><{$vo.carName}></td>
						<td><{$vo.year}></td>
						<td><{$vo.num}>个</td>						
						<td><{$vo.createTime|date='Y-m-d H:i:s',###}></td>
						<td>
							<a href="<{:U('Chexing/car' , array('chexingID'=>$vo['id']))}>" class="layui-btn layui-btn-normal layui-btn-mini">具体车型</a>
							<a href="javascript:;" onclick="openModel('<{:U('Chexing/edit' , array('id'=>$vo['id']))}>','编辑','80%','80%');" class="layui-btn layui-btn-mini">编辑</a>
						</td>
					</tr>
					</volist>				
				</tbody>
			</table>
			</form>
		</div>
	</fieldset>
	<div class="admin-table-page">
		<div id="page" class="page"><{$page}></div>
	</div>
</div>